package xin.workflow.rest;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * <pre>
 * ListResponse
 * </pre>
 *
 * @author lixin_ma@outlook.com
 * @version 1.0
 * @since 2018/12/19
 */
@Data
@ToString
public class ListResponse<T>  implements Serializable {
    String msg;
    T result;
    int count;

    public ListResponse count(int count) {
        this.setCount(count);
        return this;
    }

    public ListResponse count(Long count) {
        this.setCount(count.intValue());
        return this;
    }

    public ListResponse msg(String msg) {
        this.setMsg(msg);
        return this;
    }

    public ListResponse result(T result) {
        this.setResult(result);
        return this;
    }
}
